//#include "stdio.h"
//#include "malloc.h"
//#ifdef _WIN32
//#define New(p) {p=(node *)malloc(sizeof(node));\
//                p->ch=getchar(); \
//                p->next=NULL;}
//#else
//#define New(p) {p=malloc(sizeof(struct node));p->ch=getchar();p->next=NULL;}
//#endif
//
//struct node
//{char ch;
//    struct node *next;
//};
//void main()
//{
//    int i;char ch;struct node *first=NULL,*p;
//    for(i=1;i<=10;i++){New(p);p->next=first;first=p;}
//    p=first;
//    while(p!=NULL){putchar(p->ch);p=p->next;}
//}